UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aADcM4IIA3aJbnupTVsbx8PWkbMgxJF0aHqHj/3nSPE=' 
WHERE 
  key_id = '5075a2a46abd21ad0aa459c54b1ab65d12ebda5becf7048bcdda273b9761bea4' 
  AND (
    token = 'aADcM4IIA3aJbnupTVsbx8PWkbMgxJF0aHqHj/3nSPE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017