UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'evSM2HfYoDi28yRrxyY2fqTCJlm4gNVKFFTWDfL1QRU='
WHERE
key_id = '91cfa0a4a02cf265629806751649d38450c8e7a3d90bb8dfdbc2f760c50cb458'
AND (
token = 'evSM2HfYoDi28yRrxyY2fqTCJlm4gNVKFFTWDfL1QRU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)