UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Pxlf05P4IipPoQoPMhXuP3r2omCCxyM2mb5ME3Rg8fI='
WHERE
key_id = '19b0afc0b549c37cb5b4189460a5e79558d1bfd10046f9832f39e4794fcbf4fc'
AND (
token = 'Pxlf05P4IipPoQoPMhXuP3r2omCCxyM2mb5ME3Rg8fI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)