UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '42aPNEeApWwIST0t3/mTerIAkAolXNHsdRRN477SWgM='
WHERE
key_id = 'c754af1654641dce8bed43e9b427311c2180ee4a30bef8ecd9778e03e109803e'
AND (
token = '42aPNEeApWwIST0t3/mTerIAkAolXNHsdRRN477SWgM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)