UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VTT/oB1Yerpi819v2oZLa5ihLjU3GMzcukdLxRlNTrg='
WHERE
key_id = '89e4eeadba042730a82995efe36b64764685abfa95ef0a3853df51a1c68ed4bb'
AND (
token = 'VTT/oB1Yerpi819v2oZLa5ihLjU3GMzcukdLxRlNTrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)