UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qF6GaF9z0d65tc5AJl2ko9bjkJNZWrcbimlA+QUPisA=' 
WHERE 
  key_id = '02e05730286de9a5262334b3f5b18e72af99d9935be66f975b40ddddb46bf93c' 
  AND (
    token = 'qF6GaF9z0d65tc5AJl2ko9bjkJNZWrcbimlA+QUPisA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027