UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'odOsWJdDQUrxS2fD7Eu/IleeAPues9NppGqh8ViWPG0='
WHERE
key_id = '073bd9490b53c7cb458b2a0df0fdeb5326e836786fc89aa7d3d983ea567b0c08'
AND (
token = 'odOsWJdDQUrxS2fD7Eu/IleeAPues9NppGqh8ViWPG0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)