UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JOkOpsMUuuLBAiHnLYvRvQabJovmz6NBLh9nFhgTTpM='
WHERE
key_id = '2036ba8283e2152657aad82db9ba3becbcbb539279db30b370e7f026abb01434'
AND (
token = 'JOkOpsMUuuLBAiHnLYvRvQabJovmz6NBLh9nFhgTTpM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)