UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'NppH/6ushoIdJLrZteBWg9IqV8xlYTlhQfM57cTGM5E=' 
WHERE 
  key_id = 'b1b151adc266b03ea38246c70ea97ecdb0dec358f83b8a6b10cc7af96467dd5f' 
  AND (
    token = 'NppH/6ushoIdJLrZteBWg9IqV8xlYTlhQfM57cTGM5E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028