UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YLvJtn/Jdagf1LiR/XXQRG2AfCXpfj/qgUQDQSMZU6c='
WHERE
key_id = '86bae63db189a0190a4004431fc5039516dadca0a7519601f984202c5ae5f552'
AND (
token = 'YLvJtn/Jdagf1LiR/XXQRG2AfCXpfj/qgUQDQSMZU6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)