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

Query time 0.00028