UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zkt3pikpcc2qaGhFsshuuzrEJesD5MPorJs32wcIqHw='
WHERE
key_id = '5b18dca3065b1743578714727a5339b675ab8921f4eb97aa4faba14b76552e58'
AND (
token = 'zkt3pikpcc2qaGhFsshuuzrEJesD5MPorJs32wcIqHw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)