UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6uSZwp/1T5/263+Pw+J4SNrNTeNsRnXh87opuaM3FpE='
WHERE
key_id = '14074e3c7eb4fe37d2f36dfb512329f42073e34d59ca88d304c3de155192be58'
AND (
token = '6uSZwp/1T5/263+Pw+J4SNrNTeNsRnXh87opuaM3FpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)