UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EytZacPy7d2/oqPejH9wJVkpKQvdnrzcVdXoLsdsPOc='
WHERE
key_id = 'c035faf63ef2bdac79d4f5727239004c4eb4116d118ccdbf2dd8b3627d980d86'
AND (
token = 'EytZacPy7d2/oqPejH9wJVkpKQvdnrzcVdXoLsdsPOc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)