UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GQyPSVFhMHqLLB5vPpX0Rj9bEAKzgfSWhUcu6wk/FX4='
WHERE
key_id = '9c319d8d75f23ed9815efdd94ee905b7b534a4cecb531d8a29eba1c8bf9e464a'
AND (
token = 'GQyPSVFhMHqLLB5vPpX0Rj9bEAKzgfSWhUcu6wk/FX4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)