UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lboj4xP2zpcJcYsqNsf//eJm4mQ1fbZlNUMu4zOjyaY='
WHERE
key_id = '61ca58d6c397074539d8235b5f4234d7a85869c2193c8926f1d91bc2216b2354'
AND (
token = 'lboj4xP2zpcJcYsqNsf//eJm4mQ1fbZlNUMu4zOjyaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)