UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M3awL/DvgUZ0UiD2PYbhKq/L6r/ROP5LlIaWBBd4X8I='
WHERE
key_id = 'fe993b9aefd9eab73f9fccec8aa0e607a6ffb83714ce6e53902c9e087c40bb8b'
AND (
token = 'M3awL/DvgUZ0UiD2PYbhKq/L6r/ROP5LlIaWBBd4X8I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)