UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GMUo4oQ1VgaUfzP5+KqphH9jQ2JkEVHnhSh6bNQAvZo='
WHERE
key_id = '3d8537b200a2bcb63ee7f06332596533e6703ab1f4eafc734d63afa57b43aade'
AND (
token = 'GMUo4oQ1VgaUfzP5+KqphH9jQ2JkEVHnhSh6bNQAvZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)