UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'v8Ip4kmHB+1KGi9nEQQFgDqc3fski6JY2vF2v6sWsbI=' 
WHERE 
  key_id = 'f93aef71ed982c7ddf8e3af860e995a5fd55b90d844f2782edf2e89dcacc0e6a' 
  AND (
    token = 'v8Ip4kmHB+1KGi9nEQQFgDqc3fski6JY2vF2v6sWsbI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054