UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FrOklK3MgQiYzW7sDg2slaEKFMFPKhjcPK7RqA/E6O8='
WHERE
key_id = '943ed1bc897d29d7afd07f3685fe6ef2c6e59141fc9a91ea088bfd237f6c8cad'
AND (
token = 'FrOklK3MgQiYzW7sDg2slaEKFMFPKhjcPK7RqA/E6O8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)