UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Sh+UihUlztI59/psTCVIBuPw34G10qo7CVhUMqXH18='
WHERE
key_id = '5264088c1d6f823a68c5cd6eeb85e10506055de9987414ffa769b6b8aa15a4c7'
AND (
token = '+Sh+UihUlztI59/psTCVIBuPw34G10qo7CVhUMqXH18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)