UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2NmvinljLV4ZTRxvD6iPRU/OFMb2w/4J4a8UIypoAAM='
WHERE
key_id = 'd73bac185eba2b0f53a15e041ae09ba5a972e07ec197b7a913e19bbb37e9193b'
AND (
token = '2NmvinljLV4ZTRxvD6iPRU/OFMb2w/4J4a8UIypoAAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)