UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1C9NutdPh3j8ZeApGEdkqnBeA5+QuKAXzPW6RzGV2kE=' 
WHERE 
  key_id = '4568dea9d4d45801a4285cd3f088534b30fd9ab8d04b32c3796c874cbdc6ea9d' 
  AND (
    token = '1C9NutdPh3j8ZeApGEdkqnBeA5+QuKAXzPW6RzGV2kE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035