UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z/r1TQ+luTU2PKFLBgSNt2/yhr+NvU5SNTzPPPSD6uE='
WHERE
key_id = '3353fe7e4f1cbb0d77ccaaa4c6f791f454462e734cfb8642b14a00d868b91bff'
AND (
token = 'z/r1TQ+luTU2PKFLBgSNt2/yhr+NvU5SNTzPPPSD6uE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)