UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SmFQH3K4H/8gMEvtGzVDJ5eT3v1OaRRa7KEVQLzQYGE=' 
WHERE 
  key_id = '15ae3a32e27f075bba27f4090606c92151f703d3b076b7f2d91e038b2d426bed' 
  AND (
    token = 'SmFQH3K4H/8gMEvtGzVDJ5eT3v1OaRRa7KEVQLzQYGE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028