UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+OvI8CxGE7kZtPARI2R1qD+gXfFCHYKKLUAuOA2cioY=' 
WHERE 
  key_id = 'b548a43df747db9b1b107e670fb9748fd1ebd4fd3309dcc42d13f517680edba6' 
  AND (
    token = '+OvI8CxGE7kZtPARI2R1qD+gXfFCHYKKLUAuOA2cioY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030