UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'i4I6v6x7SS2V1oL7zYM5JptQnifKL0rBP/D06S2qWzw=' 
WHERE 
  key_id = 'eeb89b2f4286a680e18474d9c50a74dce60699ca75b953c8d1ec1964414ad383' 
  AND (
    token = 'i4I6v6x7SS2V1oL7zYM5JptQnifKL0rBP/D06S2qWzw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030