UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ohbAsALFTeqSIga73kvQcXyNLhVXLM5b6ESO7KbQ2X0='
WHERE
key_id = '73463ceaf6502bb399bdc93392ff6a95918551b276d799f46b54c045b2ba3040'
AND (
token = 'ohbAsALFTeqSIga73kvQcXyNLhVXLM5b6ESO7KbQ2X0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)