UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5nMO7KSqhGb095QbU2c3ObxM7yuMG5/nPhgqFMiLYPM=' 
WHERE 
  key_id = 'e01fffc530c834fab7600a0fa4d0aecbfc89d7527cc9decc3bbfdd17ec9b06b0' 
  AND (
    token = '5nMO7KSqhGb095QbU2c3ObxM7yuMG5/nPhgqFMiLYPM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018