UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xizjePymyAiLQRhiNdiDUQ0196GC1p0zXy2I0t+9u/Q='
WHERE
key_id = '7c5d491b83f1dfc364e833cf33aebcd1d281654b42ddc4e17e19eb7fd5e2cb58'
AND (
token = 'xizjePymyAiLQRhiNdiDUQ0196GC1p0zXy2I0t+9u/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)