UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fL8C7vRRbNmQwNpFcJ9Syf++WuzUrPkNSx/x+bN2bEk=' 
WHERE 
  key_id = '1b5322b13ac4c8e7b807cdeb6d1ef3cf2000438a7abfd9d18cfdfe846050a36c' 
  AND (
    token = 'fL8C7vRRbNmQwNpFcJ9Syf++WuzUrPkNSx/x+bN2bEk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00066