UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DQ5Pz1hL99Cd1M6BSWhWc3LMC9ZYu6oR6zIaExbymoo=' 
WHERE 
  key_id = '863e6baef2234d2fad7dff7b455b88812a156fb9a5d9f1131ca0345b4bebb0b8' 
  AND (
    token = 'DQ5Pz1hL99Cd1M6BSWhWc3LMC9ZYu6oR6zIaExbymoo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00088