UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/e0A6b4kFd55iz/GyjFHqMM0L4qrzLfnNOKdFgV+FGw=' 
WHERE 
  key_id = 'a641fe345f5447034a960790d9ae6e09118f4bea2cdd90c36e35d07d0976983e' 
  AND (
    token = '/e0A6b4kFd55iz/GyjFHqMM0L4qrzLfnNOKdFgV+FGw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031