UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EXjxjDEhhWGK7dF78DpUJ0a6++nlaK6Wrx3+/g0gBcY='
WHERE
key_id = '0b801cb93bca079c9b74037b54a80912e6a3f3ec4ae7e03e0008535aa7211c67'
AND (
token = 'EXjxjDEhhWGK7dF78DpUJ0a6++nlaK6Wrx3+/g0gBcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)