UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r6qBo6JcejR/2NBq+JWQa9048nsVAnv6fESUstJP+Jc='
WHERE
key_id = '26d4cbb8cc1b4224e569748d086aaf334ae3bd705483b5d3ea59f8f49eaf5788'
AND (
token = 'r6qBo6JcejR/2NBq+JWQa9048nsVAnv6fESUstJP+Jc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)