UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rm4bgFVCvedZ0i0AGjG/AsODg49+ZKfuW5TJwvR3TOM='
WHERE
key_id = '94abb2b3c5604cf2c829a1191132bcf662ac2c3264c0e489a9534f9c821081f9'
AND (
token = 'Rm4bgFVCvedZ0i0AGjG/AsODg49+ZKfuW5TJwvR3TOM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)