UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MHHv9BiZ1obeIAnlqfGSWpr6DKkLj/geVjlzqD/CxIM='
WHERE
key_id = 'd4fc253f04bea197fd915a290e1f7f283744a93663641ad58bf9e89459d7ca5b'
AND (
token = 'MHHv9BiZ1obeIAnlqfGSWpr6DKkLj/geVjlzqD/CxIM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)