UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wCnxSFOV5iyjMRys6fVYuQbkN72jWk3Vnpu2gXFy5Ao='
WHERE
key_id = '93a56d658680fb3d3b460762e99fd8ccd9f5025b315a26cf5b13ab3caf8ede68'
AND (
token = 'wCnxSFOV5iyjMRys6fVYuQbkN72jWk3Vnpu2gXFy5Ao='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)